﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="quan_tri_feedback.ascx.cs" Inherits="Admin_Module_quan_tri_feedback" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<telerik:RadAjaxManager OnAjaxRequest="Ajax_Request" ID="RadAjaxManager1" runat="server" 
    DefaultLoadingPanelID="RadAjaxLoadingPanel1">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="grd" />
            </UpdatedControls>
        </telerik:AjaxSetting>
       
        <telerik:AjaxSetting AjaxControlID="grd">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="grd" />
                <telerik:AjaxUpdatedControl ControlID="lblMessage" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default">
</telerik:RadAjaxLoadingPanel>

<telerik:RadWindowManager OnClientClose="Window_Close" ID="RadWindowManager1" runat="server" >
    <Windows>
        <telerik:RadWindow VisibleStatusbar="false" Width="800px" Height="600px" runat="server" ID="windows1"></telerik:RadWindow>
    </Windows>
</telerik:RadWindowManager>

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript">
        function Window_Close() {
            $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind");
        }
    </script>
</telerik:RadCodeBlock>

<asp:Label runat="server" ID="lblMessage"></asp:Label>

<fieldset>
    <legend>Danh Sách Feedback</legend>
    
    <telerik:RadGrid runat="server" OnDeleteCommand="Feedback_Delete" AutoGenerateColumns="false" ID="grd">
        <MasterTableView>
            <Columns>
                <telerik:GridBoundColumn HeaderText="ID" Display="false" DataField="FeedbackID"></telerik:GridBoundColumn>
                <telerik:GridTemplateColumn HeaderText="Tiêu đề" DataField="">
                    <ItemTemplate>
                            <%# Eval("Title")%>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridBoundColumn HeaderText="Email" DataField="Email"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn HeaderText="Noi dung" DataField="FeedbackContent"></telerik:GridBoundColumn>
                <telerik:GridTemplateColumn HeaderText="Thời gian" DataField="FeedbackDate">
                    <ItemTemplate>
                        <%# Utils.Format.FormatVietNameDateTime(Convert.ToDateTime(Eval("FeedbackDate"))) %>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridBoundColumn HeaderText="Từ IP" DataField="FeedbackIP"></telerik:GridBoundColumn>
                <telerik:GridTemplateColumn>
                    <ItemTemplate>
                        <asp:CheckBox runat="server" CssClass='<%# Eval("FeedbackID") %>' ID='chk' AutoPostBack="true" Checked='<%# Convert.ToBoolean(Eval("IsApproved")) %>' OnCheckedChanged="ChangeApproved" />
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridButtonColumn CommandName="Delete" UniqueName="DeleteColumn" ButtonType="ImageButton" ConfirmText="Bạn có chắc chắn muốn xóa giải đấu?"  ImageUrl="/Image/delete.png"></telerik:GridButtonColumn>
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>
</fieldset>

